<?php

getInMenu($this->menu);

function getInMenu( $menus )
{
	
	
	if (!$menus)
		return ;
	echo '<div class="inner-menu nav-collapse ">';

	foreach($menus as $key=>$menu )
	{
		if (isset($menu['prim']) )
		{
			echo '<div class="inner-wrapper">',CHtml::link('<span class="bold">'.$menu['label'].'</span>', $menu['url'], array('class'=>'btn btn-block btn-primary')),'</div>';
			unset( $menus[$key] );
		}
	}

	if ($menus)
	{
		echo '<div class="inner-menu-content"><p class="menu-title">Основные функции<span class="pull-right"><i class="icon-refresh"></i></span></p></div>';
		Yii::app()->controller->widget('zii.widgets.CMenu', array(
				'items'=>$menus,
				'htmlOptions'=>array('class'=>'big-items'),
			));
	}
	
	
	echo '<ul class="small-items">
		<li class=""><a href="#"> Home</a></li>
		<li><span class="badge badge-important">2</span><a href="#"> Work</a></li>
	</ul>
	<div class="inner-wrapper">	  				
		<p class="menu-title">Часто используемые</p>		
	</div>
	<ul class="small-items">
		<li class=""><a href="#"> Documents</a></li>
		<li class=""><span class=" badge badge-disable ">203</span><a href="#"> Images</a></li>
		<li class=""><a href="#"> Flagged</a></li>		
	</ul>
</div>';

}